Optimal. Leaf size=67 \[ -\frac {x^{-n}}{2 n}-\frac {x^{-n} \cosh \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {b \text {Chi}\left (2 b x^n\right ) \sinh (2 a)}{n}+\frac {b \cosh (2 a) \text {Shi}\left (2 b x^n\right )}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5471, 5429,
3378, 3384, 3379, 3382} \begin {gather*} \frac {b \sinh (2 a) \text {Chi}\left (2 b x^n\right )}{n}+\frac {b \cosh (2 a) \text {Shi}\left (2 b x^n\right )}{n}-\frac {x^{-n} \cosh \left (2 \left (a+b x^n\right )\right )}{2 n}-\frac {x^{-n}}{2 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3378
Rule 3379
Rule 3382
Rule 3384
Rule 5429
Rule 5471
Rubi steps
\begin {align*} \int x^{-1-n} \cosh ^2\left (a+b x^n\right ) \, dx &=\int \left (\frac {x^{-1-n}}{2}+\frac {1}{2} x^{-1-n} \cosh \left (2 a+2 b x^n\right )\right ) \, dx\\ &=-\frac {x^{-n}}{2 n}+\frac {1}{2} \int x^{-1-n} \cosh \left (2 a+2 b x^n\right ) \, dx\\ &=-\frac {x^{-n}}{2 n}+\frac {\text {Subst}\left (\int \frac {\cosh (2 a+2 b x)}{x^2} \, dx,x,x^n\right )}{2 n}\\ &=-\frac {x^{-n}}{2 n}-\frac {x^{-n} \cosh \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {b \text {Subst}\left (\int \frac {\sinh (2 a+2 b x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-n}}{2 n}-\frac {x^{-n} \cosh \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {(b \cosh (2 a)) \text {Subst}\left (\int \frac {\sinh (2 b x)}{x} \, dx,x,x^n\right )}{n}+\frac {(b \sinh (2 a)) \text {Subst}\left (\int \frac {\cosh (2 b x)}{x} \, dx,x,x^n\right )}{n}\\ &=-\frac {x^{-n}}{2 n}-\frac {x^{-n} \cosh \left (2 \left (a+b x^n\right )\right )}{2 n}+\frac {b \text {Chi}\left (2 b x^n\right ) \sinh (2 a)}{n}+\frac {b \cosh (2 a) \text {Shi}\left (2 b x^n\right )}{n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 54, normalized size = 0.81 \begin {gather*} \frac {x^{-n} \left (-\cosh ^2\left (a+b x^n\right )+b x^n \text {Chi}\left (2 b x^n\right ) \sinh (2 a)+b x^n \cosh (2 a) \text {Shi}\left (2 b x^n\right )\right )}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.00, size = 90, normalized size = 1.34
method | result | size |
risch | \(-\frac {x^{-n}}{2 n}-\frac {{\mathrm e}^{-2 a -2 b \,x^{n}} x^{-n}}{4 n}+\frac {b \,{\mathrm e}^{-2 a} \expIntegral \left (1, 2 b \,x^{n}\right )}{2 n}-\frac {x^{-n} {\mathrm e}^{2 a +2 b \,x^{n}}}{4 n}-\frac {b \,{\mathrm e}^{2 a} \expIntegral \left (1, -2 b \,x^{n}\right )}{2 n}\) | \(90\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 47, normalized size = 0.70 \begin {gather*} -\frac {b e^{\left (-2 \, a\right )} \Gamma \left (-1, 2 \, b x^{n}\right )}{2 \, n} + \frac {b e^{\left (2 \, a\right )} \Gamma \left (-1, -2 \, b x^{n}\right )}{2 \, n} - \frac {1}{2 \, n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 182 vs.
\(2 (64) = 128\).
time = 0.38, size = 182, normalized size = 2.72 \begin {gather*} \frac {{\left ({\left (b \cosh \left (2 \, a\right ) + b \sinh \left (2 \, a\right )\right )} \cosh \left (n \log \left (x\right )\right ) + {\left (b \cosh \left (2 \, a\right ) + b \sinh \left (2 \, a\right )\right )} \sinh \left (n \log \left (x\right )\right )\right )} {\rm Ei}\left (2 \, b \cosh \left (n \log \left (x\right )\right ) + 2 \, b \sinh \left (n \log \left (x\right )\right )\right ) - {\left ({\left (b \cosh \left (2 \, a\right ) - b \sinh \left (2 \, a\right )\right )} \cosh \left (n \log \left (x\right )\right ) + {\left (b \cosh \left (2 \, a\right ) - b \sinh \left (2 \, a\right )\right )} \sinh \left (n \log \left (x\right )\right )\right )} {\rm Ei}\left (-2 \, b \cosh \left (n \log \left (x\right )\right ) - 2 \, b \sinh \left (n \log \left (x\right )\right )\right ) - \cosh \left (b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right ) + a\right )^{2} - \sinh \left (b \cosh \left (n \log \left (x\right )\right ) + b \sinh \left (n \log \left (x\right )\right ) + a\right )^{2} - 1}{2 \, {\left (n \cosh \left (n \log \left (x\right )\right ) + n \sinh \left (n \log \left (x\right )\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{- n - 1} \cosh ^{2}{\left (a + b x^{n} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {cosh}\left (a+b\,x^n\right )}^2}{x^{n+1}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________